package eleven;

import java.util.List;
import java.util.ListIterator;
import java.util.Stack;

import eleven.typeinfo.pets.Pet;
import eleven.typeinfo.pets.Pets;

public class ListIteration {

	public static void main(String[] args) {
		List<Pet> pets = Pets.arrayList(8);
		ListIterator<Pet> it = pets.listIterator();
		while (it.hasPrevious()) {
			System.out.println(it.previous().id()+" ");
		}
		System.out.println();
		System.out.println(pets);
		
		it = pets.listIterator(3);
		while (it.hasNext()) {
			it.next();
			it.set(Pets.randomPet());
		}
		Object o = new Object();
		//Stack s = new Stack<o>();
		
		
		
		
		
	}

}
